
using System;

namespace LastFMGenNHibernate.EN.LastFM
{
        public class ComentarioEN
        {
        /**
         *
         */

        private int id;

        /**
         *
         */

        private String comment;

        /**
         *
         */

        private LastFM.EventoEN evento;

        /**
         *
         */

        private LastFM.CancionEN cancion;





        public virtual int Id { get { return id; } set { id = value;  } }


        public virtual String Comment { get { return comment; } set { comment = value;  } }


        public virtual LastFM.EventoEN Evento { get { return evento; } set { evento = value;  } }


        public virtual LastFM.CancionEN Cancion { get { return cancion; } set { cancion = value;  } }



        public ComentarioEN()
        {
        }



        public ComentarioEN(int id, String comment, LastFM.EventoEN evento, LastFM.CancionEN cancion)
        {
                this.init (id, comment, evento, cancion);
        }


        public ComentarioEN(ComentarioEN comentario)
        {
                this.init (comentario.Id, comentario.Comment, comentario.Evento, comentario.Cancion);
        }

        private void init (int id, String comment, LastFM.EventoEN evento, LastFM.CancionEN cancion)
        {
                this.Id = id;


                this.Comment = comment;

                this.Evento = evento;

                this.Cancion = cancion;
        }

        public override bool Equals (object obj)
        {
                if (obj == null)
                        return false;
                ComentarioEN t = obj as ComentarioEN;
                if (t == null)
                        return false;
                if (Id.Equals (t.Id))
                        return true;
                else
                        return false;
        }

        public override int GetHashCode ()
        {
                int hash = 13;

                hash += (null == Id ? 0 : this.Id.GetHashCode ());
                return hash;
        }
        }
}
